<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="author" content="逯灿灿">
    <title></title>
    <style>
    .box{
        width: 520px;
        height: 280px;
        margin: 100px auto;
        position: relative;
    }
    ul{
        margin: 0;
        padding: 0;
        list-style: none;
    }
    li{
        position: absolute;
        top: 0;
        left: 0;
        display: none;
    }
    li.current{
        display: block;
    }
    </style>
</head>
<body>
    <div class="box">
        <ul>
            <li class="current"><a href="#"><img src="img/01.jpg" alt=""></a></li>
            <li><a href="#"><img src="img/02.jpg" alt=""></a></li>
            <li><a href="#"><img src="img/03.jpg" alt=""></a></li>
            <li><a href="#"><img src="img/04.jpg" alt=""></a></li>
            <li><a href="#"><img src="img/05.jpg" alt=""></a></li>
        </ul>
    </div>
    <script src="./js/jquery.js"></script>
</body>
</html>
<script>

    var index = 0;
    setInterval(function(){
        index = index==4 ? 0 : index+1;
        $('li').eq(index).addClass('current').siblings().removeClass('current');
    },1000);

</script>